package com.shelpe.services.scheduler.syncclient;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.shelpe.services.scheduler.dto.AdgroupRecordDto;


@FeignClient(name="${lexiconserver.serviceID}", url="${lexiconserver.url}")
public interface RecommendWordClient {
	
	@RequestMapping(method = RequestMethod.POST, value = "/lexiconservice/adgroups/{adgroup_id}/records", consumes="application/json;charset=UTF-8")
	public Response create(@PathVariable("adgroup_id")long adgroupID, @RequestBody AdgroupRecordDto dto);
	
	@RequestMapping(method = RequestMethod.POST, path="/lexiconservice/adgroups/{adgroup_id}/metrics")
	public Response metrics(@PathVariable("adgroup_id")long adgroupID);
	
	@RequestMapping(method = RequestMethod.POST, path="/lexiconservice/adgroups/{adgroup_id}/tags")
	public Response tags(@PathVariable("adgroup_id")long adgroupID);
	
	
	public static class Response{
		private long adgroupID;
		private String adgroupRecordID;
		private boolean status;
		public long getAdgroupID() {
			return adgroupID;
		}
		public void setAdgroupID(long adgroupID) {
			this.adgroupID = adgroupID;
		}
		public String getAdgroupRecordID() {
			return adgroupRecordID;
		}
		public void setAdgroupRecordID(String adgroupRecordID) {
			this.adgroupRecordID = adgroupRecordID;
		}
		public boolean isStatus() {
			return status;
		}
		public void setStatus(boolean status) {
			this.status = status;
		}
	}
}
